home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
wrnsr094
/
file_sel.frm
< prev
next >
Wrap
Text File
|
1995-05-08
|
3KB
|
120 lines
VERSION 2.00
Begin Form File_Select
BorderStyle = 3 'Fixed Double
Caption = "Select File"
ClientHeight = 4995
ClientLeft = 1080
ClientTop = 1380
ClientWidth = 6060
ControlBox = 0 'False
Enabled = 0 'False
Height = 5400
Left = 1020
LinkMode = 1 'Source
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4995
ScaleWidth = 6060
Top = 1035
Visible = 0 'False
Width = 6180
Begin FileListBox sel_file
Height = 3345
Left = 3360
TabIndex = 2
Top = 1440
Width = 2415
End
Begin DirListBox sel_dir
BackColor = &H00FFFFFF&
ForeColor = &H00000000&
Height = 3375
Left = 360
TabIndex = 1
Top = 1440
Width = 2535
End
Begin CommandButton Cancel_button
Caption = "Cancel"
Height = 495
Left = 4200
TabIndex = 5
Top = 840
Width = 735
End
Begin CommandButton OK_button
Caption = "OK"
Default = -1 'True
Height = 495
Left = 3360
TabIndex = 4
Top = 840
Width = 615
End
Begin DriveListBox sel_drive
Height = 315
Left = 360
TabIndex = 0
Top = 840
Width = 2655
End
Begin TextBox sel_filename
Height = 375
Left = 1440
TabIndex = 3
Top = 240
Width = 4335
End
End
Sub Cancel_button_Click ()
file_select.enabled = False
file_select.visible = False
sel_filename.text = ""
End Sub
Sub Form_GotFocus ()
sel_drive.enabled = True
Call sel_file_pathchange
End Sub
Sub OK_button_Click ()
file_select.enabled = False
file_select.visible = False
End Sub
Sub sel_dir_Change ()
sel_file.path = sel_dir.path
End Sub
Sub sel_drive_Change ()
sel_dir.path = CurDir$(sel_drive.drive)
End Sub
Sub sel_file_click ()
If Right$(sel_file.path, 1) = "\" Then
sel_filename.text = sel_file.path + sel_file.filename
Else
sel_filename.text = sel_file.path + "\" + sel_file.filename
End If
End Sub
Sub sel_file_DblClick ()
Call sel_file_click
Call OK_button_Click
End Sub
Sub sel_file_pathchange ()
sel_file.pattern = "*.*"
Call sel_file_patternchange
End Sub
Sub sel_file_patternchange ()
If Right$(sel_file.path, 1) = "\" Then
sel_filename.text = sel_file.path + sel_file.pattern
Else
sel_filename.text = sel_file.path + "\" + sel_file.pattern
End If
End Sub